package com.csd.fragment;

import com.csd.activity.AccountActivity;
import com.csd.activity.EmployeeActivity;
import com.csd.activity.MessageActivity;
import com.csd.activity.PeccancyActivity;
import com.csd.activity.R;
import com.csd.activity.ReceiptActivity;
import com.csd.activity.ResertPasswordActivity;
import com.csd.activity.StatusAuditingActivity;
import com.csd.base.BaseFragment;
import com.csd.view.BadgeView;

import android.app.ActionBar;
import android.app.ActionBar.LayoutParams;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

public class EmployeeFragment extends BaseFragment{

//	private ActionBar actionBar;
	private LinearLayout ll_resertPassword,ll_account,ll_employee,ll_receipt,ll_peccancy,ll_statusAuditing;
	public View view ;
	private ImageView msg;
	@Override
	public View onCreateView(LayoutInflater inflater,
			@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
		// TODO Auto-generated method stub
	            view = inflater.inflate(R.layout.fragment_employee, container, false);
		initView();
		return view;
	}
	
	private void initView() {
		// TODO Auto-generated method stub

		msg = (ImageView) view.findViewById(R.id.msg);
		BadgeView badge = new BadgeView(getActivity(), msg);
		badge.setText("2");
		badge.show();
		msg.setOnClickListener(this);
		ll_resertPassword = (LinearLayout) view.findViewById(R.id.resert_password);
		ll_resertPassword.setOnClickListener(this);
		ll_account = (LinearLayout) view.findViewById(R.id.accout);
		ll_account.setOnClickListener(this);
		ll_employee = (LinearLayout) view.findViewById(R.id.employee);
		ll_employee.setOnClickListener(this);
		ll_receipt = (LinearLayout) view.findViewById(R.id.receipt);
		ll_receipt.setOnClickListener(this);
		ll_peccancy = (LinearLayout) view.findViewById(R.id.peccancy);
		ll_peccancy.setOnClickListener(this);
		ll_statusAuditing = (LinearLayout) view.findViewById(R.id.status_auditing);
		ll_statusAuditing.setOnClickListener(this);
		
	}
	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.resert_password:
			Intent intent = new Intent(getActivity(), ResertPasswordActivity.class);
			startActivity(intent);
			break;
		case R.id.accout:
			Intent intent1 = new Intent(getActivity(), AccountActivity.class);
			startActivity(intent1);
			break;
		case R.id.employee:
			Intent intent2 = new Intent(getActivity(), EmployeeActivity.class);
			startActivity(intent2);
			break;
		case R.id.receipt:
			Intent intent3 = new Intent(getActivity(), ReceiptActivity.class);
			startActivity(intent3);
			break;
		case R.id.peccancy:
			Intent intent4 = new Intent(getActivity(),PeccancyActivity.class);
			startActivity(intent4);
			break;
		case R.id.msg:
			Intent intent5 = new Intent(getActivity(), MessageActivity.class);
			startActivity(intent5);
			break;
		case R.id.status_auditing:
			Intent intent6 = new Intent(getActivity(), StatusAuditingActivity.class);
			startActivity(intent6);
			break;
		default:
			break;
		}
	}

	@Override
	protected View initView(LayoutInflater inflater) {
		rootView = inflater.inflate(R.layout.fragment_employee, null);
		return rootView;
	}

	@Override
	protected void findViewById() {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void setListener() {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void initData(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		
	}
}
